#ifndef PAINTLISTWIDGET_H
#define PAINTLISTWIDGET_H

#include <QWidget>
#include <QMouseEvent>

namespace Ui {
class PaintListWidget;
}

class PaintListWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PaintListWidget(QWidget *parent = nullptr);
    ~PaintListWidget();

    void mouseReleaseEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

    void setPenSelected();
    void setNitePenSelected();

    bool m_bPressed=false;
    QPoint m_point;

public slots:
    void onBtnPenClicked();
    void onBtnNitePenClicked();
    void onBtnEraserClicked();
    void onBtnRevokeClicked();
    void onBtnBgClicked();
    void onBtnClearClicked();
    void onBtnExitClicked();
    void onBtnSelectPenClicked();
    void onBtnSelectNitePenClicked();

protected:
    bool winEvent(MSG *message, long *result);
    void initUI();

signals:
    void penClicked();
    void nitePenClicked();
    void eraserClicked();
    void revokeClicked();
    void bgClicked();
    void clearClicked();
    void exitClicked();
    void selectPenClicked();
    void selectNitePenClicked();

private:
    Ui::PaintListWidget *ui;
};

#endif // PAINTLISTWIDGET_H
